<%= form_for @report, :html => {:class => "main_form report"} do |f| %>
	<% if @report.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@report.errors.count, "error") %> prohibited this report from being saved:</h2>

      <ul>
      <% @report.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
	
	<div class="field">
		<b>I wonder</b> <%= f.text_field :name, :placeholder => "report name as a question...", :size => 50 %><b>?</b>
	</div>
	
	<div class="field">
		<%= f.label :description %>
		<%= f.text_area :description, :rows => 3, :cols => 50%>
	</div>
	
	<div class="field">
		<%= f.label :report_type %>
		<%= f.select :report_type, {"Line" => {:value => "Line"}, "Bar" => {:disabled => true}, "Pie" => {:disabled => true}} %>
	</div>
	
	<hr/>
	
	<h4>Tracks these metrics</h4>
	<ul class="report_metric_ids">
		<% if IWonder::Metric.active.length > 0%>
			<% for metric in IWonder::Metric.active.order(:name) do %>
				<li>
					<%= check_box_tag "report[metric_ids][]", metric.id, @report.metrics.include?(metric) %>
					<%= label_tag "report[metric_ids][]", metric.name %>
				</li>
			<% end %>
		<% else %>
			You don't have any metrics to track yet.
		<% end %>
	</ul>
	
	<hr/>
	
	<div class="field">
		<%= f.submit %>
	</div>
	
<% end %>